import { http } from '@/utils/http'

/**
 * 列表
 */
export const getListApi = () => {
  return http({
    method: 'POST',
    url: '/V5/repair/pageList',
    data: {},
  })
}

/**
 * 详情
 */
export const getDetailApi = (params) => {
  return http({
    method: 'POST',
    url: '/V5/repair/detail',
    data: params,
  })
}

/**
 * 获取项目
 */
export const getMaintenanceApi = () => {
  return http({
    method: 'POST',
    url: '/V5/maintenanceParam/getAllList',
    data: {
      status: 1,
      type: 0,
    },
  })
}
/**
 * 车列表
 */
export const getLicenseNoLikeApi = (e) => {
  return http({
    method: 'POST',
    url: '/V5/carInfo/getLicenseNoLike',
    data: {
      licenseNoLike: e,
      pageNumber: 1,
      pageSize: 30,
    },
  })
}
/**
 * 新增
 */
export const createApi = (params) => {
  return http({
    method: 'POST',
    url: '/V5/repair/create',
    data: params,
  })
}
/**
 * 编辑
 */
export const editApi = (params) => {
  return http({
    method: 'POST',
    url: '/V5/repair/update',
    data: params,
  })
}
/**
 * 删除（没接口）
 */
export const deleteApi = (params) => {
  return http({
    method: 'POST',
    url: '/V5/repair/delete',
    data: params,
  })
}

/** 关闭维修单 */
export const closeApi = (params) => {
  return http({
    method: 'POST',
    url: '/V5/repair/close',
    data: params,
  })
}
